/*    */ package net.sourceforge.appgen.generator;
/*    */ 
/*    */ import java.io.File;
/*    */ import net.sourceforge.appgen.model.Entity;
/*    */ import net.sourceforge.appgen.model.GenerationInformation;
/*    */ 
/*    */ public class ListPageFileGenerator extends FileGenerator
/*    */ {
/*    */   public static final String TEMPLATE = "list.vm";
/*    */ 
/*    */   public ListPageFileGenerator(GenerationInformation generationInformation)
/*    */   {
/* 32 */     super(generationInformation);
/*    */   }
/*    */ 
/*    */   public File generate(Entity entity) throws Exception
/*    */   {
/* 37 */     if (!getDirectory(entity).exists()) {
/* 38 */       getDirectory(entity).mkdirs();
/*    */     }
/*    */ 
/* 41 */     return super.generate(entity);
/*    */   }
/*    */ 
/*    */   public File getDirectory(Entity entity) {
/* 45 */     return new File(getDirectory() + File.separator + entity.getInstanceName());
/*    */   }
/*    */ 
/*    */   public File getFile(Entity entity)
/*    */   {
/* 50 */     return new File(getDirectory(entity), "list.html");
/*    */   }
/*    */ 
/*    */   public File getDirectory()
/*    */   {
/* 55 */     return new File(this.outputDir.getPath() + File.separator + "WebContent" + File.separator + "WEB-INF" + File.separator + "sys");
/*    */   }
/*    */ 
/*    */   public String getTemplate()
/*    */   {
/* 60 */     return "list.vm";
/*    */   }
/*    */ }

/* Location:           C:\Users\lzl6066\Downloads\net.sourceforge.appgen_1.2.0\plugins\net.sourceforge.appgen_1.2.0.201002031718\
 * Qualified Name:     net.sourceforge.appgen.generator.ListPageFileGenerator
 * JD-Core Version:    0.6.0
 */